// themeStore.js
import {
	ref,
	computed
} from 'vue';
import {
	useUserStore
} from '@/stores/user.js'
const userType = computed(() => {
	return useUserStore().userType
})
const userTypeMap = {
	1: 'operation',
	2: 'agent',
	4: 'merchant',
}

export function toggleTheme() {
	// #ifdef H5
	document.documentElement.setAttribute('data-theme', userTypeMap[userType.value] ?? 'default');
	// #endif
	// console.log(`data-theme-${userTypeMap[userType.value] ?? 'default'}`);
	return `data-theme-${userTypeMap[userType.value] ?? 'default'}`
}